<template>
  <template v-for="item in list">
    <el-menu-item :index="item.path" v-if="!item.children">{{ item.name }}</el-menu-item>
    <el-submenu :index="item.path" v-if="item.children" popper-class="submenu">
      <template #title>{{ item.name }}</template>
      <header-menu-item :list="item.children"></header-menu-item>
    </el-submenu>
  </template>
</template>

<script>
export default {
  name: "HeaderMenuItem",
  props: ["list"],
}
</script>
